<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620" />
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jtip.js" type="text/javascript"></script>
<head>
<body>
<div id="contentPad">
  <?
require_once("../../mainfile.php");
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$news=$_GET[id];
$res[news] = $db->select_query("SELECT * FROM ".TB_NEWS." where id='".$news."' ORDER BY id ");

$arr[news] = $db->fetch($res[news]);
	$res[category] = $db->select_query("SELECT category_name FROM ".TB_NEWS_CAT." WHERE id='".$arr[news][category]."' "); 
	$arr[category] = $db->fetch($res[category]);
	$newsid=$arr[news][id];
	$ress[com] = $db->select_query("SELECT *,count(news_id) as com FROM ".TB_NEWS_COMMENT." WHERE news_id ='".$newsid."' group by news_id"); 
	$arrs[com] = $db->fetch($ress[com]);
?>
												<IMG class="mysborder" SRC="newsicon/<?=$arr[news][post_date];?>.jpg"  ALIGN="left" ><B><font color="#990066"><B>[ <?= ThaiTimeConvert($arr[news][post_date],"","");?> ] </font><font color="#0066FF"><?=$arr[news][topic];?></font></B>
					<?=NewsIcon(TIMESTAMP, $arr[news][post_date], "images/icon_new.gif");?>( <?=$arr[news][pageview];?> / <?=$arrs[com][com];?> )  <br>
					&nbsp;&nbsp;<?=$arr[news][headline];?>  โดย <?=$arr[news][posted];?>


<?
$db->closedb ();

?>
</div>
</body>
</html>